<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
					xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:Real_Silverlight="clr-namespace:Real.Silverlight.Controls"
					xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
					xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
					mc:Ignorable="d">

	

	<Style TargetType="Real_Silverlight:SwitchButton">

        <!--<Setter Property="TopGradientBackgroundColor"
                Value="#FF60B2FF" />
        
        <Setter Property="TopMiddleGradientBackgroundColor"
                Value="#FF276FFF" />

        <Setter Property="BottomGradientBackgroundColor"
                Value="#FF5E6FFF" />

        <Setter Property="BottomMiddleGradientBackgroundColor"
                Value="#FF3670FF" />-->

        <Setter Property="Foreground"
                Value="White" />

        <Setter Property="Cursor"
				Value="Hand" />
		<Setter Property="Template">
			<Setter.Value>
                <ControlTemplate TargetType="Real_Silverlight:SwitchButton">

					<Grid Width="100"
						  Height="30">
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="CheckStates">
								<VisualState x:Name="Checked">
									<Storyboard>
										<DoubleAnimation Duration="0"
											To="55.5"
											Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)"
											Storyboard.TargetName="switch"
											d:IsOptimized="True" />
										<DoubleAnimation Duration="0"
											To="0"
											Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)"
											Storyboard.TargetName="switch"
											d:IsOptimized="True" />
                                        <!--#FF5E6FFF-->
                                        <!--bottom-->
										<ColorAnimation Duration="0"
                                                        To="#FF5E6FFF"
											Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)"
											Storyboard.TargetName="bgRect"
											d:IsOptimized="True" />
                                        <!--#FF60B2FF-->
                                        <!--Top-->
										<ColorAnimation Duration="0"
                                                        To="#FF60B2FF"
											Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)"
											Storyboard.TargetName="bgRect"
											d:IsOptimized="True" />
                                        <!--#FF007ABA-->
                                        <!--nothing-->
										<ColorAnimation Duration="0"
                                                        To="#FF007ABA"
											Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)"
											Storyboard.TargetName="bgRect"
											d:IsOptimized="True" />
                                        <!--#FF276FFF-->
                                        <!--MiddleTop-->
										<ColorAnimation Duration="0"
                                                        To="#FF276FFF"
											Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[4].(GradientStop.Color)"
											Storyboard.TargetName="bgRect"
											d:IsOptimized="True" />
										<DoubleAnimation Duration="0"
											To="0.535"
											Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[4].(GradientStop.Offset)"
											Storyboard.TargetName="bgRect"
											d:IsOptimized="True" />
										<DoubleAnimation Duration="0"
											To="0.535"
											Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Offset)"
											Storyboard.TargetName="bgRect"
											d:IsOptimized="True" />
                                        <!--#FF3670FF-->
                                        <!--MiddleBottom-->
                                        <ColorAnimation Duration="0"
                                                        To="#FF3670FF"
											Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)"
											Storyboard.TargetName="bgRect"
											d:IsOptimized="True" />
										<DoubleAnimation Duration="0" To="0.529" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Offset)" Storyboard.TargetName="bgRect" d:IsOptimized="True"/>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Unchecked" />
								<VisualState x:Name="Indeterminate" />
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
						<Rectangle Stroke="Gray"
								   RadiusX="5"
								   RadiusY="5"
								   x:Name="bgRect"
								   StrokeThickness=".5">
                            <Rectangle.Fill>
                                <LinearGradientBrush EndPoint="0,0"
                                                     StartPoint="0,1">
                                    <GradientStop Offset="0"
                                                  Color="#D8D8D8" />
                                    <GradientStop Offset="0.5"
                                                  Color="#C6C6C6" />
                                    <GradientStop Offset="0.5"
                                                  Color="#D8D8D8" />
                                    <GradientStop Offset="1"
                                                  Color="White" />
                                    <GradientStop Color="#FFBCC1BE"
                                                  Offset="0.5" />
                                </LinearGradientBrush>
                            </Rectangle.Fill>
						</Rectangle>
						<Line X1="30"
							  Y1="8"
							  X2="30"
							  Y2="22"
                              Stroke="{TemplateBinding Foreground}"
							  StrokeThickness="3"
							  StrokeEndLineCap="Round" />
						<Ellipse Width="14"
								 Height="14"
								 Stroke="{TemplateBinding Foreground}"
								 StrokeThickness="2"
								 Margin="42,0,0,0" />
						<Rectangle Stroke="Gray"
								   RadiusX="5"
								   RadiusY="5"
								   Width="45"
								   HorizontalAlignment="Left"
								   x:Name="switch"
								   StrokeThickness=".5"
								   RenderTransformOrigin="0.5,0.5">
							<Rectangle.RenderTransform>
								<CompositeTransform />
							</Rectangle.RenderTransform>
                            <Rectangle.Fill>
                                <LinearGradientBrush EndPoint="0,0"
                                                     StartPoint="0,1">
                                    <GradientStop Offset="1"
                                                  Color="White" />
                                    <GradientStop Color="LightGray" />
                                </LinearGradientBrush>
                            </Rectangle.Fill>
						</Rectangle>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
    
	</Style>

   

   
</ResourceDictionary>
